Skip to content

fix(mcp): support custom Chrome user data dirs#80

Merged
yize merged 1 commit into
masterfrom
agent/support-custom-user-data-dir
Jul 23, 2026
Merged

fix(mcp): support custom Chrome user data dirs#80
yize merged 1 commit into
masterfrom
agent/support-custom-user-data-dir

Conversation

@yize

@yize yize commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What changed

  • add --user-data-dir <path> and --user-data-dir=<path> support to the native-host installer
  • add XSWITCH_MCP_USER_DATA_DIR for automated installs while preserving XSWITCH_MCP_MANIFEST_PATH as the highest-priority exact override
  • document that manifests belong under <user-data-dir>/NativeMessagingHosts/, not inside an individual Chrome profile
  • add install, uninstall, environment precedence, path-with-spaces, and validation coverage
  • update xswitch-mcp to version 0.3.1

Why

Chrome instances launched with a custom --user-data-dir resolve per-user Native Messaging manifests from that data root. The installer previously always wrote to the default Chrome data directory, causing Specified native messaging host not found even though the runtime was installed correctly.

Validation

  • npx eslint mcp/install-host.js __tests__/mcp-installer.spec.ts
  • npm test — 34 tests passed
  • npm run build
  • npm --prefix mcp run build
  • packed xswitch-mcp-0.3.1.tgz and verified custom-directory install/uninstall end to end

@yize
yize merged commit 3dce9f5 into master Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant